package aiku.numericalcontroloa.Controller.productTypeController;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import aiku.numericalcontroloa.Base.Utils.Result;
import aiku.numericalcontroloa.Model.Entity.productType.productlibrary;
import aiku.numericalcontroloa.Service.productType.productlibraryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@RestController
@RequestMapping("/productlibrary")
@Slf4j
public class productlibraryController {

    @Autowired
    private productlibraryService Service;

    @PostMapping("/getProductlibrary")
    public Result getProductlibrary() {
        return Service.getProductlibrary();
    }

    @PostMapping("/addProductlibrary")
    public Result addProductlibrary(@RequestBody productlibrary data) {
        return Service.addProductlibrary(data);
    }

    @PostMapping("/updateProductlibrary")
    public Result updateProductlibrary(@RequestBody productlibrary data) {
        return Service.updateProductlibrary(data);
    }

    @PostMapping("/deleteProductlibrary")
    public Result deleteProductlibrary(@RequestBody productlibrary data) {
        return Service.deleteProductlibrary(data);
    }

}
